package com.xja.git.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class Entry implements Serializable {
    private Integer id;

    private Integer author;

    private String title;

    private String summary;

    private String content;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date modifytime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date posttime;

    private String postip;

    private Integer hits;

    private Integer commentsize;

    private String entrystatus;

    private Integer categoryid;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getAuthor() {
        return author;
    }

    public void setAuthor(Integer author) {
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary == null ? null : summary.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getModifytime() {
        return modifytime;
    }

    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }

    public Date getPosttime() {
        return posttime;
    }

    public void setPosttime(Date posttime) {
        this.posttime = posttime;
    }

    public String getPostip() {
        return postip;
    }

    public void setPostip(String postip) {
        this.postip = postip == null ? null : postip.trim();
    }

    public Integer getHits() {
        return hits;
    }

    public void setHits(Integer hits) {
        this.hits = hits;
    }

    public Integer getCommentsize() {
        return commentsize;
    }

    public void setCommentsize(Integer commentsize) {
        this.commentsize = commentsize;
    }

    public String getEntrystatus() {
        return entrystatus;
    }

    public void setEntrystatus(String entrystatus) {
        this.entrystatus = entrystatus == null ? null : entrystatus.trim();
    }

    public Integer getCategoryid() {
        return categoryid;
    }

    public void setCategoryid(Integer categoryid) {
        this.categoryid = categoryid;
    }

    public Entry() {
    }

    public Entry(Integer id, Integer author, String title, String summary, String content, Date modifytime, Date posttime, String postip, Integer hits, Integer commentsize, String entrystatus, Integer categoryid) {
        this.id = id;
        this.author = author;
        this.title = title;
        this.summary = summary;
        this.content = content;
        this.modifytime = modifytime;
        this.posttime = posttime;
        this.postip = postip;
        this.hits = hits;
        this.commentsize = commentsize;
        this.entrystatus = entrystatus;
        this.categoryid = categoryid;
    }

    public Entry(Integer author, String title, String summary, String content, Date modifytime, Date posttime, String postip, Integer hits, Integer commentsize, String entrystatus, Integer categoryid) {
        this.author = author;
        this.title = title;
        this.summary = summary;
        this.content = content;
        this.modifytime = modifytime;
        this.posttime = posttime;
        this.postip = postip;
        this.hits = hits;
        this.commentsize = commentsize;
        this.entrystatus = entrystatus;
        this.categoryid = categoryid;
    }

    @Override
    public String toString() {
        return "Entry{" +
                "id=" + id +
                ", author=" + author +
                ", title='" + title + '\'' +
                ", summary='" + summary + '\'' +
                ", content='" + content + '\'' +
                ", modifytime=" + modifytime +
                ", posttime=" + posttime +
                ", postip='" + postip + '\'' +
                ", hits=" + hits +
                ", commentsize=" + commentsize +
                ", entrystatus='" + entrystatus + '\'' +
                ", categoryid=" + categoryid +
                '}';
    }
}